package com.mapproject.industrymap.service.impl;

import com.alibaba.fastjson.JSON;
import com.mapproject.industrymap.entity.SysUploadFileEntity;
import com.mapproject.industrymap.mapper.BaseInfoMapper;
import com.mapproject.industrymap.service.DxfTransforPgService;
import com.mapproject.industrymap.service.SysUploadFileService;
import com.mapproject.industrymap.utils.DataItemShapefile;
import com.mapproject.industrymap.utils.DataItemDxf;
import com.mapproject.industrymap.utils.DataPgdump;
import com.mapproject.industrymap.utils.ReturnValue;
import com.mapproject.industrymap.utils.UnZipFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Service
public class DxfTransforPgServiceImpl implements DxfTransforPgService {
    @Autowired
    SysUploadFileService sysUploadFileService;
    @Autowired
    UnZipFile unZipFile;
    @Autowired
    BaseInfoMapper baseInfoMapper;
    @Value("${file.uploadFolder}")
    private String uploadFolder;
    @Value("${file.projectFileDir}")
    private String projectFileDir;

    @Override
    public  String uploadInsertDxfData(String tableName,String fileName){

        String uploadPath=projectFileDir;
        String filePath = uploadFolder+uploadPath+fileName+"/"+fileName+".dxf";//dxf文件地址
        DataItemDxf dataItemDxf=new DataItemDxf();
        return dataItemDxf.cadToPG(tableName,fileName,filePath);
    }


}
